<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>测试fromEvent</title>
</head>
<body>
<input id="inputText" type="text"/>
<script src="../node_modules/jquery/dist/jquery.js"></script>
<script src="../node_modules/rx/dist/rx.all.js"></script>
<script>
//	let inps = document.getElementById('inputText');
//	let input$ = Rx.Observable.fromEvent(inps,'keyup');
//	input$
//	.pluck('target', 'value')
//	.subscribe(value=>console.log(value));
//	.filter(ev=>ev.keyCode===32)
//	.subscribe(input => console.log(input.target.value))
//	.map(ev=>ev.target.value)
//	.subscribe(value=>console.log(value));

let click$ = Rx.Observable.fromEvent(document, 'click');
click$.subscribe(e=>console.log(e));
</script>
</body>
</html>